{% extends 'base.html' %}
{% load custom_filters %}
{% block title %}{{station.station_name}}{% endblock %}
{% block content %}
<div class="row">
    <div class="col" align="center">
        <h2>{{station.station_name}}</h2>
    </div>
</div>
<div class="row">
    {% if station %}
    <div class="col">
        <form method="post" action="/ai_inspect/station_battery_count_validate/{{station.station_id}}/">
            {% csrf_token %}
            <input type="hidden" name="station_id" value="{{station.station_id}}">
            <input type="hidden" name="validate_time" value="{% now 'Y-m-d H:i:s' %}">
        <table class="table table-striped">
            <tr>
                <td>换电站编号：{{station.station_id}}</td>
                <td>换电站名称：{{station.station_name}}</td>
            </tr>
            <tr>
                <td>换电站厂家：{{station.station_maker}}</td>
                <td>换电站型号：{{station.station_type}}</td>
            </tr>
            <tr>
                <td>站控类型：{{station.station_model}}</td>
                <td>架载机数量：{{station.charger_count}}</td>
            </tr>
            <tr>
                <td>备电数量：{{station.battery_count}}</td>
                <td>数据时间：{{station.dw_time}}</td>
            </tr>
            <tr>
                <td>人工复核：<input class="form-control-inline" name="battery_count_validate" value="{{station.battery_count_validate|get_count}}" required></td>
                <td><button type="submit" class="btn btn-primary btn-block">提交</button></td>
            </tr>
        </table>
        </form>
    </div>
    {% else %}
    <div class="col">
        <div class="alert alert-danger" role="alert">未检索到换电站</div>
    </div>
    {% endif %}
</div>
{% endblock %}